﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Circle.Domain.Entity;
using Circle.Domain.Interface.Service;

namespace Circle.Service
{
    public class UploadFileService : BaseOwnerCrudService<UploadFile>, IUploadFileService
    {
        public override UploadFile Create()
        {
            var file = base.Create();
            file.UserId = Security.CurrentUser.UserId;
            file.UploadDate = DateTime.UtcNow;
            file.GenerateId();
            return file;
        }

        public UploadFile Create(string filePath)
        {
            var file = Create();
            file.FilePath = filePath;
            return file;
        }
    }
}
